from django.db import models
from utils.BaseModel import BaseModel
# Create your models here.
class UserModel(BaseModel):
    username=models.CharField(max_length=32,unique=True,verbose_name="账号")
    password=models.CharField(max_length=32)
    phone=models.CharField(max_length=11,unique=True,verbose_name="手机号")
    email=models.EmailField(unique=True,verbose_name="邮箱")
    headimg=models.CharField(null=True,blank=True,verbose_name="头像",max_length=255)
    intro=models.CharField(max_length=255,verbose_name="简介",default="")
    score=models.IntegerField(verbose_name="积分",default=100)
    level=models.IntegerField(choices=((0,"普通会员"),(1,"银牌会员"),(2,"金牌会员")),default=0)
    class Meta:
        db_table='fguser'

    def __str__(self):
        return self.username

